package com.example.listener;

import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;

/**
 * @program: sms
 * @description:
 * @author: zhanghz001
 * @create: 2020-11-04 14:33
 **/
//需要添加
// @WebListener
public class ServletContextAttributeListenerDemo01 implements ServletContextAttributeListener {
    @Override
    public void attributeAdded(ServletContextAttributeEvent event) {
        System.out.println(event.getName() + event.getName());
        System.out.println("添加了");
    }

    @Override
    public void attributeRemoved(ServletContextAttributeEvent event) {
        System.out.println(event.getName() + event.getName());
        System.out.println("删除了");

    }

    @Override
    public void attributeReplaced(ServletContextAttributeEvent event) {
        System.out.println(event.getName() + event.getName());
        System.out.println("替换了");

    }
}
